package com.fanly.weixin.entity;

import java.util.List;

import com.google.gson.Gson;
/**
 * 最近四天天气信息
 * @author fanlizhi
 *
 */
public class WeatherInfos {

	private String error;
	private String status;
	private String date;
	private List<WeatherOneInfos> results;
	public String getError() {
		return error;
	}
	public void setError(String error) {
		this.error = error;
	}
	public String getStatus() {
		return status;
	}
	public void setStatus(String status) {
		this.status = status;
	}
	public String getDate() {
		return date;
	}
	public void setDate(String date) {
		this.date = date;
	}
	public List<WeatherOneInfos> getResults() {
		return results;
	}
	public void setResults(List<WeatherOneInfos> results) {
		this.results = results;
	}
	
	public static void main(String[] args) {
		String resultJson = "{\"error\":0,\"status\":\"success\",\"date\":\"2017-11-03\",\"results\":[{\"currentCity\":\"杭州\",\"pm25\":\"83\",\"index\":[{\"title\":\"穿衣\",\"zs\":\"较舒适\",\"tipt\":\"穿衣指数\",\"des\":\"建议着薄外套、开衫牛仔衫裤等服装。年老体弱者应适当添加衣物，宜着夹克衫、薄毛衣等。\"},{\"title\":\"洗车\",\"zs\":\"较适宜\",\"tipt\":\"洗车指数\",\"des\":\"较适宜洗车，未来一天无雨，风力较小，擦洗一新的汽车至少能保持一天。\"},{\"title\":\"感冒\",\"zs\":\"极易发\",\"tipt\":\"感冒指数\",\"des\":\"昼夜温差极大，且风力较强，极易发生感冒，请特别注意增减衣服保暖防寒。\"},{\"title\":\"运动\",\"zs\":\"较适宜\",\"tipt\":\"运动指数\",\"des\":\"阴天，较适宜进行各种户内外运动。\"},{\"title\":\"紫外线强度\",\"zs\":\"最弱\",\"tipt\":\"紫外线强度指数\",\"des\":\"属弱紫外线辐射天气，无需特别防护。若长期在户外，建议涂擦SPF在8-12之间的防晒护肤品。\"}],\"weather_data\":[{\"date\":\"周五 11月03日 (实时：24℃)\",\"dayPictureUrl\":\"http://api.map.baidu.com/images/weather/day/yin.png\",\"nightPictureUrl\":\"http://api.map.baidu.com/images/weather/night/duoyun.png\",\"weather\":\"阴转多云\",\"wind\":\"北风4-5级\",\"temperature\":\"24 ~ 9℃\"},{\"date\":\"周六\",\"dayPictureUrl\":\"http://api.map.baidu.com/images/weather/day/duoyun.png\",\"nightPictureUrl\":\"http://api.map.baidu.com/images/weather/night/duoyun.png\",\"weather\":\"多云\",\"wind\":\"北风3-4级\",\"temperature\":\"16 ~ 8℃\"},{\"date\":\"周日\",\"dayPictureUrl\":\"http://api.map.baidu.com/images/weather/day/qing.png\",\"nightPictureUrl\":\"http://api.map.baidu.com/images/weather/night/qing.png\",\"weather\":\"晴\",\"wind\":\"东北风微风\",\"temperature\":\"18 ~ 11℃\"},{\"date\":\"周一\",\"dayPictureUrl\":\"http://api.map.baidu.com/images/weather/day/duoyun.png\",\"nightPictureUrl\":\"http://api.map.baidu.com/images/weather/night/duoyun.png\",\"weather\":\"多云\",\"wind\":\"东风微风\",\"temperature\":\"22 ~ 14℃\"}]}]}";
		Gson gson = new Gson();
		WeatherInfos infos = gson.fromJson(resultJson, WeatherInfos.class);
		System.out.println(infos);
	}
	@Override
	public String toString() {
		return "WeatherInfos [error=" + error + ", status=" + status + ", date=" + date +", results = " + results+ "]";
	}
}



